package com.simple.cms.common.enums;


public enum ResultCode {
    SUCCESS(0, "操作成功"),

    SYSTEM_ERROR(10001, "服务器内部错误"),

    INVALID_PARAMETER(10002, "参数 %s 无效"),

    PARAMETER_ERROR(10003, "参数 %s 不在指定值域范围内"),

    INVALID_TOKEN(10004, "无效TOKEN");


    /**
     * 错误码
     */
    private int code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 构造函数
     *
     * @param code 错误码
     * @param msg  错误信息
     */
    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
